//全部工具栏
const toolsMap = {
    bold: {
        name: '加粗',
        icon: 'icon-01jiacu',
        check: 'B',
        aCommandName: 'bold'
    },
    italic: {
        name: '斜体',
        icon: 'icon-02xieti',
        check: 'I',
        aCommandName: 'italic'
    },
    underline: {
        name: '下划线',
        icon: 'icon-03xiahuaxian',
        check: 'U',
        aCommandName: 'underline'
    },
    header: {
        name: '标题',
        icon: 'icon-heading',
        check: 'size',
        childrens: {
            1: {
                name: '一级标题',
                icon: 'icon-13biaoti1',
                aCommandName: 'fontsize',
                aCommandValue: '5'
            },
            2: {
                name: '二级标题',
                icon: 'icon-14biaoti2',
                aCommandName: 'fontsize',
                aCommandValue: '4'
            },
            false: {
                name: 'normal',
                icon: 'icon-15biaoti3',
                aCommandName: 'fontsize',
                aCommandValue: '3'
            },
            3: {
                name: '四级标题',
                icon: 'icon-16biaoti4',
                aCommandName: 'fontsize',
                aCommandValue: '2'
            },
            4: {
                name: '五级标题',
                icon: 'icon-17biaoti5',
                aCommandName: 'fontsize',
                aCommandValue: '1'
            }
        }
    },
    fontname: {
        name: '字体',
        icon: 'icon-font',
        check: 'face',
        childrens: {
            serif: {
                name: 'serif',
                aCommandName: 'fontname',
                aCommandValue: 'serif'
            },
            cursive: {
                name: 'cursive',
                aCommandName: 'fontname',
                aCommandValue: 'cursive'
            },
            Monospace: {
                name: 'Monospace',
                aCommandName: 'fontname',
                aCommandValue: 'Monospace'
            }
        }
    },
    color: {
        name: '红色字体',
        icon: 'icon-24zitiyanse',
        check: 'color',
        onlySelection: true,
        aCommandName: 'forecolor',
        aCommandValue: 'red'
    },
    background: {
        name: '绿色背景',
        icon: 'icon-19beijingyanse',
        check: 'background-color',
        onlySelection: true,
        aCommandName: 'backColor',
        aCommandValue: 'lightgreen'
    },
    align: {
        name: '对齐',
        icon: 'icon-11juzhongduiqi',
        check: 'text-align',
        childrens: {
            left: {
                name: '左对齐',
                icon: 'icon-09zuoduiqi',
                aCommandName: 'justifyLeft'
            },
            right: {
                name: '右对齐',
                icon: 'icon-10youduiqi',
                aCommandName: 'justifyRight'
            },
            center: {
                name: '居中对齐',
                icon: 'icon-11juzhongduiqi',
                aCommandName: 'justifyCenter'
            }
        }
    },
    list: {
        name: '对齐',
        icon: 'icon-unorderedList',
        check: 'list',
        childrens: {
            ordered: {
                name: '有序列表',
                icon: 'icon-orderedList',
                aCommandName: 'insertorderedlist'
            },
            bullet: {
                name: '无序列表',
                icon: 'icon-unorderedList',
                aCommandName: 'insertunorderedlist'
            }
        }
    },
    image: {
        name: '图片',
        icon: 'icon-xingzhuang-tupian',
        check: 'img',
        onlySelection: true,
        aCommandName: 'insertimage',
        aCommandValue: './lib/img.png'
    },
    link: {
        name: '链接',
        icon: 'icon-07lianjie',
        check: 'a',
        onlySelection: true,
        aCommandName: 'createlink',
        aCommandValue: '请输入链接地址'
    },
    redo: {
        name: '前进一步',
        icon: 'icon-26quxiaochehui',
        onlySelection: true,
        aCommandName: 'redo'
    },
    undo: {
        name: '后退一步',
        icon: 'icon-25chehui',
        onlySelection: true,
        aCommandName: 'undo'
    }
};

//默认工具栏
const defaultToolBar = [
    [
        {
            name: '标题',
            icon: 'icon-heading',
            check: 'size',
            options: [
                {
                    name: '一级标题',
                    icon: 'icon-13biaoti1',
                    aCommandName: 'fontsize',
                    aCommandValue: '5'
                },
                {
                    name: '二级标题',
                    icon: 'icon-14biaoti2',
                    aCommandName: 'fontsize',
                    aCommandValue: '4'
                },
                {
                    name: '三级标题',
                    icon: 'icon-15biaoti3',
                    aCommandName: 'fontsize',
                    aCommandValue: '3'
                },
                {
                    name: '四级标题',
                    icon: 'icon-16biaoti4',
                    aCommandName: 'fontsize',
                    aCommandValue: '2'
                },
                {
                    name: '五级标题',
                    icon: 'icon-17biaoti5',
                    aCommandName: 'fontsize',
                    aCommandValue: '1'
                }
            ]
        }
    ],
    [
        {
            name: '加粗',
            icon: 'icon-01jiacu',
            check: 'B',
            aCommandName: 'bold'
        },
    ],[

        {
            name: '斜体',
            icon: 'icon-02xieti',
            check: 'I',
            aCommandName: 'italic'
        },
        {
            name: '下划线',
            icon: 'icon-03xiahuaxian',
            check: 'U',
            aCommandName: 'underline'
        }
    ]
   
   
];
